<%@page import="com.ckeditor.CKEditorConfig"%>
<%@page import="java.util.Iterator"%>
<%@page import="org.beanstech.model.SystemModel"%>
<%@page import="org.beanstech.persistence.Mstblsubject"%>
<%@page import="java.util.List"%>
<%@page import="org.beanstech.dao.DropDownConstructDao"%>
<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>
<%
	if(session.getAttribute("userid")==null){
	%>
	<jsp:forward page="Before_login.jsp"></jsp:forward>
	<%} %>

<%@include file="header.jsp" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	
	<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="js/jquery.numeric.js"></script>
	
	<link rel="stylesheet" href="css/main.css" type="text/css" />
	<script type="text/javascript">
	function loginsubmit(){
		document.getElementById("sellbook").submit();
		
	}
	</script>
	<title>Second Book Exchange | Effort towards Green Campaign</title>
	
	<%
	DropDownConstructDao dropdown = new DropDownConstructDao();
	List<SystemModel> customlist = dropdown.getSubjectList();
	CKEditorConfig settings = new CKEditorConfig();
	settings.addConfigValue("toolbar","[]");
	settings.addConfigValue("width","320");
	settings.addConfigValue("height","100");
	%>
</head><body>
	
		<div id="full_div_text">
		<div class="mydiv">
 		<h2>Register your Book </h2>
		</div>
		<div class="mydiv">
		Tips to help you successfully Sell Your Book
		<ul>
			<li>For Title and Author please do not enter any symbols such as & (the ampersand symbol) and remember to enter the title as you see it e.g. Text and Tests 5 and not Text & Tests5.</li>
			<li>What you enter determines what is returned on a search.</li>
			<li>If you are selling a workbook please enter the word workbook in the title.</li>
			<li>Finally, please do NOT separate words with commas.</li>
		</ul>
  	 

		</div>
		<div class="mydiv">
		<form name="registerbook" action="RegisterBook" method="post" id="sellbook" enctype="multipart/form-data">
		<table align="center">
		<tr>
		<td class="tdFont">Book Name </td>
			<td align="right" width="320px">
			<div class="loginboxdiv">
  				<input type="text" class="loginbox" name="bookname"/>
			</div>
			</td>
		</tr>
		<tr>
		<td class="tdFont">Author</td>
			<td align="right">
			<div class="loginboxdiv">
  				<input type="text" class="loginbox" name="author"/>
			</div>
			</td>
		</tr>
		<tr>
		<td class="tdFont">Subject </td>
			<td align="right">
			<div>
  				<select class="divstyled" name="subject">
                    <%for(Iterator i = customlist.iterator(); i.hasNext();){ 
                    	SystemModel model = (SystemModel)i.next();
                    %>
                    <option value="<%=model.getId()%>"><%=model.getName() %></option>
                    <%} %>
                  </select>                                                                                           </select>
			</div>
			</td>
		</tr>
		<tr>
		<tr>
		<td>&nbsp;</td>
		<td colspan="1" align="right"> 
		If your subject is not in the list, enter here
		</td>
			
		</tr>
		<tr>
		<td>&nbsp;</td>
		<td colspan="1" align="right"> 
		<div class="rounddiv">
		<input type="text" name="subjectext" class="loginbox"/>
		</div>
		</td>
			
		</tr>
		
		
		
		
		<tr>
		<td class="tdFont">Edition</td>
		<td colspan="1" align="right"> 
		<div>
  				<select class="divstyled" name="edition">
  					<%customlist = dropdown.getEditionList(); %>
                    <%for(Iterator i = customlist.iterator(); i.hasNext();){ 
                    	SystemModel model = (SystemModel)i.next();
                    %>
                    <option value="<%=model.getId()%>"><%=model.getName() %></option>
                    <%} %>
                  </select>                                                                                           </select>
			</div>
		</td>
			
		</tr>
		
		<tr>
		<td class="tdFont">Book Condition</td>
		<td colspan="1" align="right"> 
		<div>
  				<select class="divstyled" name="conditon">
  					<%customlist = dropdown.getConditionList(); %>
                    <%for(Iterator i = customlist.iterator(); i.hasNext();){ 
                    	SystemModel model = (SystemModel)i.next();
                    %>
                    <option value="<%=model.getId()%>"><%=model.getName() %></option>
                    <%} %>
                  </select>                                                                                           </select>
			</div>
		</td>
			
		</tr>
		
		<tr>
		<td class="tdFont">Selling Price</td>
		<td colspan="1" align="right"> 
		<div class="loginboxdiv">
		<span class="yellowrupee">`</span>
		<input type="text" class="loginbox_1" name="selling">
		</div>
		</td>
			
		</tr>
		
		<tr>
		<td class="tdFont">Book Price(MRP)</td>
		<td colspan="1" align="right"> 
		<div class="loginboxdiv">
		<span class="yellowrupee">`</span>
		<input type="text" class="loginbox_1" name="bookprice">
		</div>
		</td>
			
		</tr>
		<tr>
		<td class="tdFont" valign="top">Notes</td>
		<td align="left">
		<div class="loginboxdivtext">
			<textarea  name="notes" id="notes"></textarea>
			</div>
		</td>
		</tr>
		<tr>
		<td class="tdFont">Book Image</td>
		<td colspan="1" align="right"> 
		<div class="loginboxdiv">
		<input type="file" class="loginbox" name="bookimage"/>
		</div>
		</td>
			
		</tr>
		<tr>
		
		<td colspan="2" align="right">
			
  				<a href="#" onclick="loginsubmit()"><img src="images/jpg_btn_submit_book.jpg" class="button" /></a>
			
			</td>
		</tr>
		</table>
		</form>
		</div>		
		</div>
		<div id="text">
			
			
			
			
		</div>
		
		
		

		<div id="green_bubble">
			<p><a href="#">Testimonials</a><a href="#">FAQ's</a><a href="#">Terms &amp; Conditions </a><a href="#">Feedback</a><a href="#">Contact</a></p>
		</div>
	</div>

	<div id="footer">
		<div class="wrap">
			<div id="bubble">
			  <p>Testimonials</p>
			  <p>"Hi, What a fab web-site.It is such a waste of money storing the used books"</p>
			</div>
			<div id="copyright">
				<p>Copyright &copy; 2011  Second Book Exchange  <a title="Awsome Web Templates" href="http://www.solucija.com/"></a></p>
			</div>
			<div class="clear"></div>
		</div>
	</div>
</body>
</html>
<ckeditor:replace replace="notes" basePath="ckeditor/" config="<%=settings %>"  />
<script type="text/javascript">


	$(".loginbox_1").numeric();
		
</script>